home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGSCAL
/
TPW50.LZH
/
TPDEMO50.PAS
next >
Wrap
Pascal/Delphi Source File
|
1988-01-31
|
7KB
|
228 lines
uses
crt,
tpwindo;
var
m,i,j,k,f,b,x:integer;
msg:string[80];
begin
textmode(1);
cursorchange(hidecursor,oldcursor);
randomize;
TPWborder(1);
tpwfill(1,1,25,40,' ',attr(7,1));
makewindow(2,5,10,18,attr(0,2),attr(10,2),2,3,1);
prtcwindow(3,'TURBO');
delay(2000);
makewindow(7,12,10,18,attr(15,4),attr(14,4),2,3,1);
prtcwindow(3,'PASCAL');
delay(2000);
makewindow(12,20,10,18,attr(0,3),attr(15,3),2,3,1);
prtcwindow(3,'WINDOWS');
delay(4000);
removewindow;
delay(1000);
removewindow;
delay(1000);
removewindow;
textmode(3);
cursorchange(hidecursor,oldcursor);
tpwborder(1);
tpwfill(1,1,25,80,' ',attr(7,1));
makewindow(4,15,10,30,attr(4,3),attr(4,3),4,3,1);
makewindow(3,36,13,40,attr(15,2),attr(15,2),3,3,1);
makewindow(9,10,13,40,attr(0,5),attr(0,5),2,3,1);
makewindow(12,42,11,36,attr(3,4),attr(3,4),1,3,1);
makewindow(3,5,7,40,attr(0,7),attr(1,7),2,3,1);
prtcwindow(3,'Presenting...');
delay(4000);
makewindow(8,20,7,40,attr(0,7),attr(1,7),2,3,1);
prtcwindow(1,'T P W I N D O');
prtcwindow(2,'5.0');
prtcwindow(4,'Windowing Routines for the');
prtcwindow(5,'Borland Turbo PASCAL Ver. 4 Compiler');
delay(3000);
makewindow(17,55,7,24,attr(0,2),attr(10,2),1,3,1);
prtwindow(1,2,'By:');
prtcwindow(3,'Rick Fothergill');
prtcwindow(4,'141 Oak Hill Road');
prtcwindow(5,'Pittsfield, MA 01201');
delay(4000);
for x := 1 to 7 do
begin
removewindow;
end;
makewindow(9,16,8,52,attr(0,7),attr(1,7),2,0,0);
prtwindow(1,2,'The basic purpose of TPWINDO is to provide');
prtwindow(2,2,'the fundamental routines for implementing');
prtwindow(3,2,'simple "windowing" into your Turbo PASCAL pro-');
prtwindow(4,2,'grams. With just a few simple statements,');
prtwindow(5,2,'you can "pop-up" a colored window onto the');
prtwindow(6,2,'screen; just like this ...');
delay(4000);
clearwindow;
prtwindow(2,2,'The window can be a solid panel of any of');
prtwindow(4,2,'the PASCAL background colors; such as ...');
delay(4000);
makewindow(10,25,7,35,attr(1,2),attr(2,2),5,0,0);
delay(3000);
removewindow;
clearwindow;
prtwindow(2,2,'or it can be surrounded by a "frame" in any');
prtwindow(4,2,'of eight styles...');
delay(3000);
makewindow(1,1,8,35,attr(0,3),attr(0,3),1,0,0);
titlewindow(1,attr(10,0),'[ Frame Style 1 ]');
makewindow(3,3,8,35,attr(14,5),attr(14,5),2,0,0);
titlewindow(2,attr(10,0),'[ Frame Style 2 ]');
makewindow(5,5,8,35,attr(15,4),attr(15,4),3,0,0);
titlewindow(3,attr(10,0),'[ Frame Style 3 ]');
makewindow(7,7,8,35,attr(0,6),attr(14,6),4,0,0);
titlewindow(1,attr(10,0),'[ Frame Style 4 ]');
makewindow(9,9,8,35,attr(0,2),attr(0,2),5,0,0);
titlewindow(3,attr(10,0),'[ Frame Style 5 ]');
makewindow(11,11,8,35,attr(0,3),attr(0,3),6,0,0);
titlewindow(1,attr(10,0),'[ Frame Style 6 ]');
makewindow(13,13,8,35,attr(14,5),attr(14,5),7,0,0);
titlewindow(2,attr(10,0),'[ Frame Style 7 ]');
makewindow(15,15,8,35,attr(15,4),attr(15,4),8,0,0);
titlewindow(3,attr(10,0),'[ Frame Style 8 ]');
delay(4000);
for x := 1 to 8 do
begin
removewindow;
end;
clearwindow;
prtwindow(1,2,'The frame itself can be in any one of the');
prtwindow(2,2,'PASCAL foreground colors. It can even blink');
prtwindow(3,2,'if you want...');
delay(3000);
for i:=0 to 15 do
begin
str(i,msg);
msg:='[ Color:'+msg+' ]';
j:=random(50);
k:=random(16);
makewindow(k+1,j+1,7,25,attr(i,5),attr(i,5),4,2,0);
titlewindow(2,attr(i,7),msg);
delay(500);
end;
makewindow(7,20,7,25,attr(31,5),attr(31,5),4,4,0);
titlewindow(2,attr(31,5),'[ Color: 31 ]');
delay(3000);
for x := 1 to 17 do
begin
removewindow;
end;
clearwindow;
prtcwindow(5,'The window itself can be presented in many');
prtcwindow(6,'different ways. It can be flat...');
delay(3000);
makewindow(5,10,10,30,attr(15,5),attr(14,5),1,0,0);
makewindow(5,45,10,30,attr(15,5),attr(14,5),1,0,0);
delay(3000);
removewindow;
removewindow;
clearwindow;
prtcwindow(4,'it can have one of two types of shadow underneath');
prtcwindow(6,'this is SOLID black - type 1 left and 2 right');
delay(3000);
makewindow(5,10,10,30,attr(15,5),attr(14,5),2,1,0);
prtcwindow(7,'Left Shadow');
delay(2000);
makewindow(5,45,10,30,attr(0,2),attr(0,2),2,2,0);
prtcwindow(7,'Right Shadow');
delay(2000);
removewindow;
removewindow;
clearwindow;
prtcwindow(6,'this is SHADOW black - type 3 left and 4 right');
delay(3000);
makewindow(5,10,10,30,attr(15,5),attr(14,5),2,3,0);
prtcwindow(7,'Left Shadow');
delay(2000);
makewindow(5,45,10,30,attr(15,2),attr(0,2),2,4,0);
prtcwindow(7,'Right Shadow');
delay(2000);
removewindow;
removewindow;
clearwindow ;
prtcwindow(2,'Titles may be placed in any of six different');
prtcwindow(3,'locations, in any color or any combinination.');
delay(2000);
makewindow(2,5,10,70,attr(15,5),attr(15,5),2,1,0);
for x:=1 to 6 do
begin
str(x,msg);
msg := '[ LOCATION '+MSG+' ]';
titlewindow(x,attr(random(16),random(8)),msg);
delay(1000);
end;
delay(3000);
removewindow;
clearwindow;
prtcwindow(3,'Windows can be zoomed');
prtcwindow(4,'onto the screen.');
delay(2000);
makewindow(2,2,15,60,attr(0,2),attr(14,2),2,0,1);
delay(2000);
makewindow(13,10,10,60,attr(1,3),attr(15,3),3,0,1);
delay(2000);
makewindow(7,33,10,45,attr(14,5),attr(14,5),1,0,1);
delay(2000);
makewindow(7,10,12,63,attr(15,4),attr(14,4),2,4,1);
prtcwindow(5,'HOW ABOUT THAT !!!');
delay(3000);
for x := 1 to 4 do
begin
removewindow;
end;
clearwindow;
prtwindow(1,2,'Once you have your window on the screen, simply');
prtwindow(2,2,'use calls to PrtWindow or PrtCWindow to put text');
prtwindow(3,2,'in them. A call to ClearWindow will erase the');
prtwindow(4,2,'contents of the window ... ');
delay(3000);
clearwindow;
prtwindow(1,2,'Each window is stored as a result of call a');
prtwindow(2,2,'to MakeWindow. To restore the screen to its');
prtwindow(3,2,'original contents, simply RemoveWindow.');
prtwindow(4,2,'Here is a good example . . .');
delay(5000);
makewindow(3,5,15,45,attr(0,2),attr(14,2),4,3,1);
prtcwindow(6,'This is screen 1 ...');
delay(2000);
makewindow(6,29,17,50,attr(15,4),attr(14,4),4,3,1);
prtcwindow(6,'This is screen 2 ...');
delay(2000);
makewindow(9,22,15,35,attr(0,3),attr(1,3),4,3,1);
prtcwindow(7,'This is screen 3 ...');
delay(2000);
prtcwindow(7,'Now we will return ...');
delay(1000);
removewindow;
prtcwindow(7,'Back to screen 2');
delay(1000);
removewindow;
prtcwindow(7,'Back to screen 1');
delay(1000);
removewindow;
removewindow;
tpwborder(0);
cursorchange(oldcursor,hidecursor);
tpwfill(1,1,25,80,' ',attr(7,0));
end.